3.41 \(\int \frac{\sec ^6(x)}{a+b \cos ^2(x)} \, dx\)

Optimal. Leaf size=79 \[ \frac{\left (a^2-a b+b^2\right ) \tan (x)}{a^3}+\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{a^{7/2} \sqrt{a+b}}+\frac{(2 a-b) \tan ^3(x)}{3 a^2}+\frac{\tan ^5(x)}{5 a} \]

[Out]

(b^3*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(a^(7/2)*Sqrt[a + b]) + ((a^2 - a*b + b^2)*Tan[x])/a^3 + ((2*a - b)
*Tan[x]^3)/(3*a^2) + Tan[x]^5/(5*a)

________________________________________________________________________________________

Rubi [A]  time = 0.101229, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3187, 461, 205} \[ \frac{\left (a^2-a b+b^2\right ) \tan (x)}{a^3}+\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{a^{7/2} \sqrt{a+b}}+\frac{(2 a-b) \tan ^3(x)}{3 a^2}+\frac{\tan ^5(x)}{5 a} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^6/(a + b*Cos[x]^2),x]

[Out]

(b^3*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(a^(7/2)*Sqrt[a + b]) + ((a^2 - a*b + b^2)*Tan[x])/a^3 + ((2*a - b)
*Tan[x]^3)/(3*a^2) + Tan[x]^5/(5*a)

Rule 3187

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*(a + (a + b)*ff^2*x^2)^p)/(1 + ff^2*x^2)^(m/2 + p
+ 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 461

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[((e*x)^m*(a + b*x^n)^p)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sec ^6(x)}{a+b \cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^3}{x^6 \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{a x^6}+\frac{2 a-b}{a^2 x^4}+\frac{a^2-a b+b^2}{a^3 x^2}+\frac{b^3}{a^3 \left (-a-(a+b) x^2\right )}\right ) \, dx,x,\cot (x)\right )\\ &=\frac{\left (a^2-a b+b^2\right ) \tan (x)}{a^3}+\frac{(2 a-b) \tan ^3(x)}{3 a^2}+\frac{\tan ^5(x)}{5 a}-\frac{b^3 \operatorname{Subst}\left (\int \frac{1}{-a-(a+b) x^2} \, dx,x,\cot (x)\right )}{a^3}\\ &=\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{a^{7/2} \sqrt{a+b}}+\frac{\left (a^2-a b+b^2\right ) \tan (x)}{a^3}+\frac{(2 a-b) \tan ^3(x)}{3 a^2}+\frac{\tan ^5(x)}{5 a}\\ \end{align*}

Mathematica [A]  time = 0.319061, size = 80, normalized size = 1.01 \[ \frac{\tan (x) \left (3 a^2 \sec ^4(x)+8 a^2+a (4 a-5 b) \sec ^2(x)-10 a b+15 b^2\right )}{15 a^3}-\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a+b}}\right )}{a^{7/2} \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^6/(a + b*Cos[x]^2),x]

[Out]

-((b^3*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a + b]])/(a^(7/2)*Sqrt[a + b])) + ((8*a^2 - 10*a*b + 15*b^2 + a*(4*a - 5*b
)*Sec[x]^2 + 3*a^2*Sec[x]^4)*Tan[x])/(15*a^3)

________________________________________________________________________________________

Maple [A]  time = 0.034, size = 80, normalized size = 1. \begin{align*}{\frac{ \left ( \tan \left ( x \right ) \right ) ^{5}}{5\,a}}+{\frac{2\, \left ( \tan \left ( x \right ) \right ) ^{3}}{3\,a}}-{\frac{ \left ( \tan \left ( x \right ) \right ) ^{3}b}{3\,{a}^{2}}}+{\frac{\tan \left ( x \right ) }{a}}-{\frac{\tan \left ( x \right ) b}{{a}^{2}}}+{\frac{{b}^{2}\tan \left ( x \right ) }{{a}^{3}}}-{\frac{{b}^{3}}{{a}^{3}}\arctan \left ({\tan \left ( x \right ) a{\frac{1}{\sqrt{ \left ( a+b \right ) a}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^6/(a+b*cos(x)^2),x)

[Out]

1/5*tan(x)^5/a+2/3*tan(x)^3/a-1/3/a^2*tan(x)^3*b+tan(x)/a-1/a^2*tan(x)*b+1/a^3*b^2*tan(x)-b^3/a^3/((a+b)*a)^(1
/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^6/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.8482, size = 832, normalized size = 10.53 \begin{align*} \left [-\frac{15 \, \sqrt{-a^{2} - a b} b^{3} \cos \left (x\right )^{5} \log \left (\frac{{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \,{\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} - 4 \,{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{3} - a \cos \left (x\right )\right )} \sqrt{-a^{2} - a b} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) - 4 \,{\left ({\left (8 \, a^{4} - 2 \, a^{3} b + 5 \, a^{2} b^{2} + 15 \, a b^{3}\right )} \cos \left (x\right )^{4} + 3 \, a^{4} + 3 \, a^{3} b +{\left (4 \, a^{4} - a^{3} b - 5 \, a^{2} b^{2}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{60 \,{\left (a^{5} + a^{4} b\right )} \cos \left (x\right )^{5}}, \frac{15 \, \sqrt{a^{2} + a b} b^{3} \arctan \left (\frac{{\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a}{2 \, \sqrt{a^{2} + a b} \cos \left (x\right ) \sin \left (x\right )}\right ) \cos \left (x\right )^{5} + 2 \,{\left ({\left (8 \, a^{4} - 2 \, a^{3} b + 5 \, a^{2} b^{2} + 15 \, a b^{3}\right )} \cos \left (x\right )^{4} + 3 \, a^{4} + 3 \, a^{3} b +{\left (4 \, a^{4} - a^{3} b - 5 \, a^{2} b^{2}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{30 \,{\left (a^{5} + a^{4} b\right )} \cos \left (x\right )^{5}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^6/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[-1/60*(15*sqrt(-a^2 - a*b)*b^3*cos(x)^5*log(((8*a^2 + 8*a*b + b^2)*cos(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2 - 4*
((2*a + b)*cos(x)^3 - a*cos(x))*sqrt(-a^2 - a*b)*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*cos(x)^2 + a^2)) - 4*((8*
a^4 - 2*a^3*b + 5*a^2*b^2 + 15*a*b^3)*cos(x)^4 + 3*a^4 + 3*a^3*b + (4*a^4 - a^3*b - 5*a^2*b^2)*cos(x)^2)*sin(x
))/((a^5 + a^4*b)*cos(x)^5), 1/30*(15*sqrt(a^2 + a*b)*b^3*arctan(1/2*((2*a + b)*cos(x)^2 - a)/(sqrt(a^2 + a*b)
*cos(x)*sin(x)))*cos(x)^5 + 2*((8*a^4 - 2*a^3*b + 5*a^2*b^2 + 15*a*b^3)*cos(x)^4 + 3*a^4 + 3*a^3*b + (4*a^4 -
a^3*b - 5*a^2*b^2)*cos(x)^2)*sin(x))/((a^5 + a^4*b)*cos(x)^5)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**6/(a+b*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.18315, size = 140, normalized size = 1.77 \begin{align*} -\frac{{\left (\pi \left \lfloor \frac{x}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{a \tan \left (x\right )}{\sqrt{a^{2} + a b}}\right )\right )} b^{3}}{\sqrt{a^{2} + a b} a^{3}} + \frac{3 \, a^{4} \tan \left (x\right )^{5} + 10 \, a^{4} \tan \left (x\right )^{3} - 5 \, a^{3} b \tan \left (x\right )^{3} + 15 \, a^{4} \tan \left (x\right ) - 15 \, a^{3} b \tan \left (x\right ) + 15 \, a^{2} b^{2} \tan \left (x\right )}{15 \, a^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^6/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

-(pi*floor(x/pi + 1/2)*sgn(a) + arctan(a*tan(x)/sqrt(a^2 + a*b)))*b^3/(sqrt(a^2 + a*b)*a^3) + 1/15*(3*a^4*tan(
x)^5 + 10*a^4*tan(x)^3 - 5*a^3*b*tan(x)^3 + 15*a^4*tan(x) - 15*a^3*b*tan(x) + 15*a^2*b^2*tan(x))/a^5